package com.yx.changdao.common.data;

import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * @Description: <br />
 * 分页记录实体
 * <p>
 * <br />
 * @Auther: Zhangjiashun
 * @create 2019/11/20 15:47
 */
public class Pager {

    // 当前页
    private Long currentPage;
    // 每页条数
    private Long pageSize;
    // 总页数
    private Long pageCount;
    // 总记录数
    private Long total;


    public <T> Pager(IPage<T> iPage) {
        this.setCurrentPage(iPage.getCurrent());
        this.setPageCount(iPage.getPages());
        this.setPageSize(iPage.getSize());
        this.setTotal(iPage.getTotal());
    }

    public Long getCurrentPage() {
        return this.currentPage;
    }

    public void setCurrentPage(Long currentPage) {
        this.currentPage = currentPage;
    }

    public Long getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public Long getPageCount() {
        return this.pageCount;
    }

    public void setPageCount(Long pageCount) {
        this.pageCount = pageCount;
    }

    public Long getTotal() {
        return this.total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }
}
